package com.ai.deepseekspring.controller;




import com.ai.deepseekspring.Anno.Auth;
import com.ai.deepseekspring.service.BaiLianDpService;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/bldp")

public class BaiLianDpController {

    @Qualifier("deepseekChatClient")
    @Autowired
    private ChatClient deepseekChatClient;

    @Qualifier("qwenChatClient")
    @Autowired
    private ChatClient qwenChatClient;


    @Autowired
    private BaiLianDpService baiLianDpService;



    @Auth(require = true)
    @PostMapping("/chatdp")
    public String hellodp(@RequestParam(required = false) String msg) {

        return baiLianDpService.chat(msg,deepseekChatClient);


    }

    @Auth(require = true)
    @GetMapping("/chatqw")
    public String hellodqw(@RequestParam(required = false) String msg) {

        return baiLianDpService.chat(msg,qwenChatClient);
    }


}
